{#管理员图书查询结果界面#}
{% extends "index.html" %}
{% block head %}
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/style.css') }}">
{% endblock %}

{% block result %}
    <table class="qgg-table">
        <tr>
            <th>图书ID</th>
            <th>图书名称</th>
            <th>图书作者</th>
            <th>图书类型</th>
            <th>图书出版社</th>
            <th>图书出版时间</th>
            <th>图书价格</th>
            {% if user and user.type == "admin" %}
                <th>图书录入时间</th>
                <th>图书总数量</th>
                <th>图书库存</th>
            {% endif %}

        </tr>
        {% for rs in results %}
            <tr>
                <td>{{ rs.book_id }}</td>
                <td>{{ rs.book_name }}</td>
                <td>{{ rs.book_author }}</td>
                <td>{{ rs.book_type }}</td>
                <td>{{ rs.book_publish }}</td>
                <td>{{ rs.book_publish_time }}</td>
                <td>{{ rs.book_price }}</td>
                {% if user and user.type == "admin" %}
                    <td>{{ rs.book_input_time }}</td>
                    <td>{{ rs.book_amount }}</td>
                    <td>{{ rs.book_stock }}</td>
                {% endif %}
            </tr>
        {% endfor %}

    </table>


{% endblock %}